package com.lmmob.autotest.uitest.controls;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

/**
 * User: zhaohuiyu
 * Date: 6/13/12
 * Time: 11:59 AM
 */
public class TextArea extends TextBoxEx {
    public TextArea(String label, WebDriver webDriver) {
        super(label, webDriver);
    }

    @Override
    protected WebElement getInputElement() {
        return findElement(By.id(getId())).findElement(By.tagName("textarea"));
    }

    @Override
    protected String getSelfQuery() {
        return String.format(".query(\"textareafield[fieldLabel='%s']\")[0]", this.label);
    }
}
